package cn.iocoder.yudao.module.member.user.vo;

import cn.iocoder.yudao.framework.region.vo.setter.CountyAutoSetter;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotNull;
import lombok.Data;

import java.time.LocalDate;
import java.util.List;

/**
 * 前台用户 Base VO，提供给添加、修改、详细的子 VO 使用
 * 如果子 VO 存在差异的字段，请不要添加到这里，影响 Swagger 文档生成
 */
@Data
public class MemberUserBaseVO implements CountyAutoSetter {

    @Schema(description = "推荐码，用户的唯一编码", requiredMode = Schema.RequiredMode.REQUIRED, example = "TEST000001")
    private String no;

    @Schema(description = "手机号", requiredMode = Schema.RequiredMode.REQUIRED, example = "15285116029")
    @NotNull(message = "手机号不能为空")
    private String mobile;

    @Schema(description = "状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
    @NotNull(message = "状态不能为空")
    private Byte status;

    @Schema(description = "用户昵称", requiredMode = Schema.RequiredMode.REQUIRED, example = "羡民")
    @NotNull(message = "用户昵称不能为空")
    private String nickname;

    @Schema(description = "头像", requiredMode = Schema.RequiredMode.REQUIRED, example = "https://exmaple.local/x.png")
    private String avatar;

    @Schema(description = "用户昵称", example = "李四")
    private String name;

    @Schema(description = "用户性别", example = "1")
    private Integer sex;

    @Schema(description = "省份编码", example = "520000")
    private String provinceCode;

    @Schema(description = "省份名称", example = "贵州省")
    private String provinceName;

    @Schema(description = "城市编码", example = "520100")
    private String cityCode;

    @Schema(description = "城市名称", example = "贵阳市")
    private String cityName;

    @Schema(description = "区县编码", example = "520102")
    private String countyCode;

    @Schema(description = "区县名称", example = "南明区")
    private String countyName;

    @Schema(description = "出生日期，时间戳格式", example = "1741276800000")
    private LocalDate birthday;

    @Schema(description = "用户备注", example = "我是小备注")
    private String mark;

    @Schema(description = "用户标签", example = "[1, 2]")
    private List<Long> tagIds;

    @Schema(description = "用户等级编号", example = "1")
    private Long levelId;

    @Schema(description = "用户部门编号", example = "1")
    private Long deptId;

    @Schema(description = "用户岗位编号", example = "[1, 2]")
    private List<Long> postIds;

    @Override
    public void setCountyName(String countyName) {
        this.countyName = countyName;
    }

    @Override
    public void setCityName(String cityName) {
        this.cityName = cityName;
    }

    @Override
    public void setProvinceName(String provinceName) {
        this.provinceName = provinceName;
    }

}
